-- @owner: @nanyang12
-- @date: 2024/10/23
-- @testpoint:单connect by子句查询

--step1:建表
drop table if exists t_connect_by_0030;
create table t_connect_by_0030(id int, lid int, name text);
--step2:插入数据
insert into t_connect_by_0030 values(1,null,'A'),(2,1,'B'),(3,2,'C');
--step3:单connect by子句查询
select * from t_connect_by_0030 connect by id=lid;
select * from t_connect_by_0030 connect by prior id=lid;
--step4:清理环境
drop table if exists t_connect_by_0030;
